import java.util.HashSet;


public class Player
{
    private int _score;
    private int _playerNum;
    private HashSet<String> _wordSet = new HashSet<String>();
    
    
    /**
     * Create the player
     *
     *@param the players number
     */  
    public Player(int playerNum)
    {
        _playerNum = playerNum;
    }
    
    
    /**
     * Add word to players wordList
     *
     *@param the word to Add
     *@return true if move is vaild
     */
    public boolean makeMove(String word)
    {
        boolean vaildMove = false;
        
            if(_wordSet.add(word))
            {
               vaildMove = true;
            }
        
        return vaildMove;
    }
    
    
    /**
     * @return the player number
     */
    public int getPlayer()
    {
        return _playerNum;
    }
    
    public int getScore()
    {
        return _score;
    }
    
    /**
     * Add points to score
     */
    public void addToScore(int points)
    {
        _score = _score + points;
    }
    
    /**
     * @return the set of words the player entered
     */
    public HashSet<String> getWords()
    {
        return _wordSet;   
    }
    
}
